package org.lmind.osgi.service.cxf.internal;

import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.Endpoint;

import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.transport.servlet.CXFNonSpringServlet;

public class CXFServlet extends CXFNonSpringServlet {

	@Override
	protected void loadBus(ServletConfig sc) {
		
		super.loadBus(sc);
		
		Bus bus = getBus();
		BusFactory.setDefaultBus(bus);
		
		Endpoint.publish("/message", new GetMessageImpl());
	}
	
}
